<?php
if(!defined("USEWYS")) exit();
global $WYSFORM,$WYSVALUE,$editor,$tm;
if($editor==''){
echo '<script language="javascript" type="text/javascript" src="editor/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
  theme : "advanced",
  mode : "textareas",
  plugins : "advimage,advlink,advhr,fullscreen,preview,media",
  theme_advanced_buttons1 : "fullscreen,preview,separator,bold,italic,underline,strikethrough,sub,sup,separator,forecolor,backcolor,separator,formatselect,fontselect,fontsizeselect",
  theme_advanced_buttons2 : "image,media,separator,link,unlink,removeformat,cleanup,advhr,charmap,separator,paste,cut,separator,outdent,indent,separator,bullist,numlist,separator,undo,redo,separator,code",
  theme_advanced_buttons3 : "",
  extended_valid_elements : "hr[class|width|size|noshade]",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_resize_horizontal : false,
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,
  editor_deselector : "ignorewysywig"
});
</script>';
$editor = 1;
}
$tm->textarea($WYSFORM,5,50,$WYSVALUE,0);
?>